<?php

class Similar_model extends CI_Model {

	public $productId;
	public $ASIN;
	public $Title;

	public function addSimilar($productId, $similarSku, $title)	{
		$this->productId = $productId;
		$this->ASIN = $similarSku;
		$this->Title = $title;
		return $this->db->insert('similars', $this);
	}
	
	public function getSimilars($productId){
		$this->db->where('productId', $productId);
		$query = $this->db->get('similars', 5);
		return $query->result();
	}
}

?>